{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 算法题1\n",
    "\n",
    "给定一种规律 pattern 和一个字符串 str ，判断 str 是否遵循相同的规律。\n",
    "\n",
    "这里的 遵循 指完全匹配，例如， pattern 里的每个字母和字符串 str 中的每个非空单词之间存在着双向连接的对应规律。\n",
    "\n",
    "示例1:\n",
    "输入: pattern = \"abba\", str = \"dog cat cat dog\"\n",
    "输出: true\n",
    "\n",
    "示例 2:\n",
    "输入:pattern = \"abab\", str = \"dog cat dog cat\"\n",
    "输出: true\n",
    "\n",
    "示例 3:\n",
    "输入: pattern = \"aaaa\", str = \"dog cat cat dog\"\n",
    "输出: false\n",
    "\n",
    "示例 4:\n",
    "输入: pattern = \"abba\", str = \"dog dog dog dog\"\n",
    "输出: false\n",
    "\n",
    "写一个函数 接收两个参数 pattern 和 str ,如果pattern和str满足相同规律输出true,不同规律则输出false"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 算法题2\n",
    "\n",
    "给定一个非空字符串 s，最多可以删除一个字符。判断是否能成为回文字符串。\n",
    "\n",
    "示例 1:\n",
    "输入: s = \"aba\"\n",
    "输出: true\n",
    "\n",
    "示例 2:\n",
    "输入: s = \"abca\"\n",
    "输出: true\n",
    "解释: 删除b或c字符,就是回文\n",
    "\n",
    "示例 3:\n",
    "输入: s = \"abc\"\n",
    "输出: false"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 算法题3\n",
    "\n",
    "集合 s 包含从 1 到 n 的整数。不幸的是，因为数据错误，导致集合里面某一个数字复制了成了集合里面的另外一个数字的值，导致集合 丢失了一个数字 并且 有一个数字重复 。\n",
    "给定一个数组 nums 代表了集合 S 发生错误后的结果。\n",
    "请你找出重复出现的整数，再找到丢失的整数，将它们以元组的形式返回。元组第一个数是重复出现的数，第二个数是丢失的数\n",
    "\n",
    "示例 1：\n",
    "输入：nums = [1,2,2,4]\n",
    "输出：(2,3)\n",
    "\n",
    "示例 2：\n",
    "输入：nums = [1,1]\n",
    "输出：(1,2)\n",
    "\n",
    "示例 2：\n",
    "输入：nums = [1,2,3,3]\n",
    "输出：(3,4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
